package com.tengju.data.infrastructure.repository.convert;

import com.tengju.data.domain.model.exchvesion.DataExchVersion;
import com.tengju.data.infrastructure.persistence.mybatis.dataobject.DataExchVersionDO;

public class DataVersionConvert {

    public static DataExchVersion toModel(DataExchVersionDO dataExchVersionDO) {
        if (dataExchVersionDO == null) {
            return null;
        }
        return new DataExchVersion(
                dataExchVersionDO.getDataName(),
                dataExchVersionDO.getQueryValue(),
                dataExchVersionDO.getVersion(),
                dataExchVersionDO.getStatus(),
                dataExchVersionDO.getCreateTime(),
                dataExchVersionDO.getUpdateTime()
        );
    }

}
